package com.mayikt.jwt;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;

/**
 * @ClassName JwtTest002
 * @Author 蚂蚁课堂余胜军 QQ644064779 www.mayikt.com
 * @Version V1.0
 **/
public class JwtTest002 {
    private static final String SIGN_KEY = "mayiktSignKey";
    public static void main(String[] args) {
        String jwt = "eyJhbGciOiJIUzI1NiJ9.eyJwaG9uZSI6IjE1OTIqKioqKjEwMCJ9.cTy583ufUB4WSYzFB2u8CTsdI8Sa-al2gs85Ufe2dh8";
        Claims body = Jwts.parser().setSigningKey(SIGN_KEY).parseClaimsJws(jwt).getBody();
        System.out.println(body);
    }
}
